package Pro;

public class ClientClass02 {
    public static void main(String[] args) throws CloneNotSupportedException {
        MyFruit fruit1 = new Apple();
        MyFruit fruit2 = new Banana();
        MyFruitStore02 mfs = MyFruitStore02.getfruitstore();
        mfs.Add(1,fruit1);
        mfs.Add(2,fruit2);
        mfs.Add(3,new Apple());
        mfs.Add(4,new Banana());
        MyFruit fruit = mfs.Get(4); //克隆得到
        fruit.display();
        System.out.println("mfs: " + mfs.toString());
    }
}
